package com.showdoc.utils;

public class BaseContext {
    private static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

    //设置当前用户的Id 的方法
    public static void setCurrentId(Integer id){
        threadLocal.set(id);
    }

    //获取当前用户Id 的方法
    public static int getCurrentId(){
        Integer id = threadLocal.get();
        return id;
    }
}
